Fix minting URL and use latest bcr-common#848
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the E-Bills minting flow to align with the latest bcr-common client API and to treat MintingEnabled mint requests as “active” for persistence/job processing.
Changes:
- Bumps workspace version to
0.5.3, updatesbcr-commongit revision, and adds a changelog entry. - Treats
MintingEnabledas an active mint-request status in persistence queries. - Refactors external mint client usage to the new
bcr-commonclient modules and simplifies theMintingEnabledhandling path inBillService.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
crates/bcr-ebill-persistence/src/db/mint.rs |
Includes MintingEnabled in the “active requests” query bindings and filter. |
crates/bcr-ebill-persistence/src/constants.rs |
Adds a new DB binding constant for the MintingEnabled status. |
crates/bcr-ebill-api/src/service/bill_service/service.rs |
Removes an extra status lookup during the MintingEnabled minting path. |
crates/bcr-ebill-api/src/external/mint.rs |
Updates mint client wiring from keys/swap clients to core/treasury clients. |
Cargo.toml |
Bumps workspace version and pins bcr-common to a newer commit. |
CHANGELOG.md |
Adds 0.5.3 entry describing the update. |
Comments suppressed due to low confidence (1)
crates/bcr-ebill-api/src/external/mint.rs:198
check_if_proofs_are_spentnow usescore_client(...)for bothkeyset_infoandcheck_state, but the error mapping still reportsError::KeyClient/Error::SwapClient. This is confusing for logs/debugging after the bcr-common client refactor; consider renaming these error variants (and their messages/docs) or mapping to variants that match the new client/module names (e.g., core vs treasury) so failures are attributable to the correct subsystem.
let keyset_info = self
.core_client(mint_url)?
.keyset_info(keyset_id_parsed)
.await
.map_err(|e| {
log::error!("Error getting keyset info from {mint_url}: {e}");
Error::KeyClient
})?;
let ys = token
.proofs(&[keyset_info])
.map_err(|_| Error::InvalidToken)?
.ys()
.map_err(|_| Error::PubKey)?;
let proof_states = self
.core_client(mint_url)?
.check_state(ys)
.await
.map_err(|e| {
log::error!("Error checking if proofs are spent at {mint_url}: {e}");
Error::SwapClient
})?;
mtbitcr
approved these changes
Mar 5, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #848 +/- ##
==========================================
- Coverage 70.48% 70.46% -0.02%
==========================================
Files 132 132
Lines 24821 24802 -19
==========================================
- Hits 17494 17477 -17
+ Misses 7327 7325 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
f105433 to
6074461
Compare
stefanbitcr
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix minting URL and use latest bcr-common